3.5 \(\int (-\frac{b \cosh (a+b x+c x^2)}{x}+\frac{\sinh (a+b x+c x^2)}{x^2}) \, dx\)

Optimal. Leaf size=107 \[ \frac{1}{2} \sqrt{\pi } \sqrt{c} e^{\frac{b^2}{4 c}-a} \text{Erf}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )+\frac{1}{2} \sqrt{\pi } \sqrt{c} e^{a-\frac{b^2}{4 c}} \text{Erfi}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )-\frac{\sinh \left (a+b x+c x^2\right )}{x} \]

[Out]

(Sqrt[c]*E^(-a + b^2/(4*c))*Sqrt[Pi]*Erf[(b + 2*c*x)/(2*Sqrt[c])])/2 + (Sqrt[c]*E^(a - b^2/(4*c))*Sqrt[Pi]*Erf
i[(b + 2*c*x)/(2*Sqrt[c])])/2 - Sinh[a + b*x + c*x^2]/x

________________________________________________________________________________________

Rubi [A]  time = 0.0822187, antiderivative size = 107, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.152, Rules used = {5390, 5375, 2234, 2204, 2205} \[ \frac{1}{2} \sqrt{\pi } \sqrt{c} e^{\frac{b^2}{4 c}-a} \text{Erf}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )+\frac{1}{2} \sqrt{\pi } \sqrt{c} e^{a-\frac{b^2}{4 c}} \text{Erfi}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )-\frac{\sinh \left (a+b x+c x^2\right )}{x} \]

Antiderivative was successfully verified.

[In]

Int[-((b*Cosh[a + b*x + c*x^2])/x) + Sinh[a + b*x + c*x^2]/x^2,x]

[Out]

(Sqrt[c]*E^(-a + b^2/(4*c))*Sqrt[Pi]*Erf[(b + 2*c*x)/(2*Sqrt[c])])/2 + (Sqrt[c]*E^(a - b^2/(4*c))*Sqrt[Pi]*Erf
i[(b + 2*c*x)/(2*Sqrt[c])])/2 - Sinh[a + b*x + c*x^2]/x

Rule 5390

Int[((d_.) + (e_.)*(x_))^(m_)*Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[((d + e*x)^(m + 1)*Si
nh[a + b*x + c*x^2])/(e*(m + 1)), x] + (-Dist[(2*c)/(e^2*(m + 1)), Int[(d + e*x)^(m + 2)*Cosh[a + b*x + c*x^2]
, x], x] - Dist[(b*e - 2*c*d)/(e^2*(m + 1)), Int[(d + e*x)^(m + 1)*Cosh[a + b*x + c*x^2], x], x]) /; FreeQ[{a,
 b, c, d, e}, x] && LtQ[m, -1] && NeQ[b*e - 2*c*d, 0]

Rule 5375

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] + Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rubi steps

\begin{align*} \int \left (-\frac{b \cosh \left (a+b x+c x^2\right )}{x}+\frac{\sinh \left (a+b x+c x^2\right )}{x^2}\right ) \, dx &=-\left (b \int \frac{\cosh \left (a+b x+c x^2\right )}{x} \, dx\right )+\int \frac{\sinh \left (a+b x+c x^2\right )}{x^2} \, dx\\ &=-\frac{\sinh \left (a+b x+c x^2\right )}{x}+(2 c) \int \cosh \left (a+b x+c x^2\right ) \, dx\\ &=-\frac{\sinh \left (a+b x+c x^2\right )}{x}+c \int e^{-a-b x-c x^2} \, dx+c \int e^{a+b x+c x^2} \, dx\\ &=-\frac{\sinh \left (a+b x+c x^2\right )}{x}+\left (c e^{a-\frac{b^2}{4 c}}\right ) \int e^{\frac{(b+2 c x)^2}{4 c}} \, dx+\left (c e^{-a+\frac{b^2}{4 c}}\right ) \int e^{-\frac{(-b-2 c x)^2}{4 c}} \, dx\\ &=\frac{1}{2} \sqrt{c} e^{-a+\frac{b^2}{4 c}} \sqrt{\pi } \text{erf}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )+\frac{1}{2} \sqrt{c} e^{a-\frac{b^2}{4 c}} \sqrt{\pi } \text{erfi}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )-\frac{\sinh \left (a+b x+c x^2\right )}{x}\\ \end{align*}

Mathematica [A]  time = 0.599733, size = 132, normalized size = 1.23 \[ \frac{\sqrt{\pi } \sqrt{c} x \text{Erf}\left (\frac{b+2 c x}{2 \sqrt{c}}\right ) \left (\cosh \left (a-\frac{b^2}{4 c}\right )-\sinh \left (a-\frac{b^2}{4 c}\right )\right )+\sqrt{\pi } \sqrt{c} x \text{Erfi}\left (\frac{b+2 c x}{2 \sqrt{c}}\right ) \left (\sinh \left (a-\frac{b^2}{4 c}\right )+\cosh \left (a-\frac{b^2}{4 c}\right )\right )-2 \sinh (a+x (b+c x))}{2 x} \]

Antiderivative was successfully verified.

[In]

Integrate[-((b*Cosh[a + b*x + c*x^2])/x) + Sinh[a + b*x + c*x^2]/x^2,x]

[Out]

(Sqrt[c]*Sqrt[Pi]*x*Erf[(b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a - b^2/(4*c)] - Sinh[a - b^2/(4*c)]) + Sqrt[c]*Sqrt[Pi
]*x*Erfi[(b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a - b^2/(4*c)] + Sinh[a - b^2/(4*c)]) - 2*Sinh[a + x*(b + c*x)])/(2*x)

________________________________________________________________________________________

Maple [F]  time = 0.112, size = 0, normalized size = 0. \begin{align*} \int -{\frac{b\cosh \left ( c{x}^{2}+bx+a \right ) }{x}}+{\frac{\sinh \left ( c{x}^{2}+bx+a \right ) }{{x}^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-b*cosh(c*x^2+b*x+a)/x+sinh(c*x^2+b*x+a)/x^2,x)

[Out]

int(-b*cosh(c*x^2+b*x+a)/x+sinh(c*x^2+b*x+a)/x^2,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{b \cosh \left (c x^{2} + b x + a\right )}{x} + \frac{\sinh \left (c x^{2} + b x + a\right )}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-b*cosh(c*x^2+b*x+a)/x+sinh(c*x^2+b*x+a)/x^2,x, algorithm="maxima")

[Out]

integrate(-b*cosh(c*x^2 + b*x + a)/x + sinh(c*x^2 + b*x + a)/x^2, x)

________________________________________________________________________________________

Fricas [B]  time = 2.09119, size = 872, normalized size = 8.15 \begin{align*} -\frac{\sqrt{\pi }{\left (x \cosh \left (c x^{2} + b x + a\right ) \cosh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) + x \cosh \left (c x^{2} + b x + a\right ) \sinh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) +{\left (x \cosh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) + x \sinh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right )\right )} \sinh \left (c x^{2} + b x + a\right )\right )} \sqrt{-c} \operatorname{erf}\left (\frac{{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \, c}\right ) - \sqrt{\pi }{\left (x \cosh \left (c x^{2} + b x + a\right ) \cosh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) - x \cosh \left (c x^{2} + b x + a\right ) \sinh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) +{\left (x \cosh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) - x \sinh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right )\right )} \sinh \left (c x^{2} + b x + a\right )\right )} \sqrt{c} \operatorname{erf}\left (\frac{2 \, c x + b}{2 \, \sqrt{c}}\right ) + \cosh \left (c x^{2} + b x + a\right )^{2} + 2 \, \cosh \left (c x^{2} + b x + a\right ) \sinh \left (c x^{2} + b x + a\right ) + \sinh \left (c x^{2} + b x + a\right )^{2} - 1}{2 \,{\left (x \cosh \left (c x^{2} + b x + a\right ) + x \sinh \left (c x^{2} + b x + a\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-b*cosh(c*x^2+b*x+a)/x+sinh(c*x^2+b*x+a)/x^2,x, algorithm="fricas")

[Out]

-1/2*(sqrt(pi)*(x*cosh(c*x^2 + b*x + a)*cosh(-1/4*(b^2 - 4*a*c)/c) + x*cosh(c*x^2 + b*x + a)*sinh(-1/4*(b^2 -
4*a*c)/c) + (x*cosh(-1/4*(b^2 - 4*a*c)/c) + x*sinh(-1/4*(b^2 - 4*a*c)/c))*sinh(c*x^2 + b*x + a))*sqrt(-c)*erf(
1/2*(2*c*x + b)*sqrt(-c)/c) - sqrt(pi)*(x*cosh(c*x^2 + b*x + a)*cosh(-1/4*(b^2 - 4*a*c)/c) - x*cosh(c*x^2 + b*
x + a)*sinh(-1/4*(b^2 - 4*a*c)/c) + (x*cosh(-1/4*(b^2 - 4*a*c)/c) - x*sinh(-1/4*(b^2 - 4*a*c)/c))*sinh(c*x^2 +
 b*x + a))*sqrt(c)*erf(1/2*(2*c*x + b)/sqrt(c)) + cosh(c*x^2 + b*x + a)^2 + 2*cosh(c*x^2 + b*x + a)*sinh(c*x^2
 + b*x + a) + sinh(c*x^2 + b*x + a)^2 - 1)/(x*cosh(c*x^2 + b*x + a) + x*sinh(c*x^2 + b*x + a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \int - \frac{\sinh{\left (a + b x + c x^{2} \right )}}{x^{2}}\, dx - \int \frac{b \cosh{\left (a + b x + c x^{2} \right )}}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-b*cosh(c*x**2+b*x+a)/x+sinh(c*x**2+b*x+a)/x**2,x)

[Out]

-Integral(-sinh(a + b*x + c*x**2)/x**2, x) - Integral(b*cosh(a + b*x + c*x**2)/x, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{b \cosh \left (c x^{2} + b x + a\right )}{x} + \frac{\sinh \left (c x^{2} + b x + a\right )}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-b*cosh(c*x^2+b*x+a)/x+sinh(c*x^2+b*x+a)/x^2,x, algorithm="giac")

[Out]

integrate(-b*cosh(c*x^2 + b*x + a)/x + sinh(c*x^2 + b*x + a)/x^2, x)